package(default_visibility = ["//visibility:public"])

load(
    "@io_bazel_rules_go//go:def.bzl",
    "go_library",
    "go_test",
)

go_test(
    name = "go_default_test",
    srcs = [
        "config_test.go",
        "plugins_test.go",
        "respond_test.go",
    ],
    embed = [":go_default_library"],
    deps = [
        "//prow/bugzilla:go_default_library",
        "//prow/github:go_default_library",
        "@com_github_google_go_cmp//cmp:go_default_library",
        "@io_k8s_apimachinery//pkg/util/diff:go_default_library",
        "@io_k8s_sigs_yaml//:go_default_library",
        "@io_k8s_utils//pointer:go_default_library",
    ],
)

go_library(
    name = "go_default_library",
    srcs = [
        "config.go",
        "plugins.go",
        "respond.go",
    ],
    importpath = "k8s.io/test-infra/prow/plugins",
    deps = [
        "//pkg/genyaml:go_default_library",
        "//prow/bugzilla:go_default_library",
        "//prow/client/clientset/versioned/typed/prowjobs/v1:go_default_library",
        "//prow/commentpruner:go_default_library",
        "//prow/config:go_default_library",
        "//prow/git/v2:go_default_library",
        "//prow/github:go_default_library",
        "//prow/jira:go_default_library",
        "//prow/kube:go_default_library",
        "//prow/labels:go_default_library",
        "//prow/logrusutil:go_default_library",
        "//prow/pluginhelp:go_default_library",
        "//prow/repoowners:go_default_library",
        "//prow/slack:go_default_library",
        "@com_github_prometheus_client_golang//prometheus:go_default_library",
        "@com_github_sirupsen_logrus//:go_default_library",
        "@io_k8s_apimachinery//pkg/util/errors:go_default_library",
        "@io_k8s_apimachinery//pkg/util/sets:go_default_library",
        "@io_k8s_client_go//kubernetes:go_default_library",
        "@io_k8s_client_go//kubernetes/typed/core/v1:go_default_library",
        "@io_k8s_sigs_yaml//:go_default_library",
    ],
)

filegroup(
    name = "config-src",
    srcs = ["config.go"],
    visibility = ["//visibility:public"],
)

filegroup(
    name = "package-srcs",
    srcs = glob(["**"]),
    tags = ["automanaged"],
    visibility = ["//visibility:private"],
)

filegroup(
    name = "all-srcs",
    srcs = [
        ":package-srcs",
        "//prow/plugins/approve:all-srcs",
        "//prow/plugins/assign:all-srcs",
        "//prow/plugins/blockade:all-srcs",
        "//prow/plugins/blunderbuss:all-srcs",
        "//prow/plugins/branchcleaner:all-srcs",
        "//prow/plugins/bugzilla:all-srcs",
        "//prow/plugins/buildifier:all-srcs",
        "//prow/plugins/cat:all-srcs",
        "//prow/plugins/cherrypickunapproved:all-srcs",
        "//prow/plugins/cla:all-srcs",
        "//prow/plugins/dco:all-srcs",
        "//prow/plugins/dog:all-srcs",
        "//prow/plugins/golint:all-srcs",
        "//prow/plugins/goose:all-srcs",
        "//prow/plugins/heart:all-srcs",
        "//prow/plugins/help:all-srcs",
        "//prow/plugins/hold:all-srcs",
        "//prow/plugins/invalidcommitmsg:all-srcs",
        "//prow/plugins/jira:all-srcs",
        "//prow/plugins/label:all-srcs",
        "//prow/plugins/lgtm:all-srcs",
        "//prow/plugins/lifecycle:all-srcs",
        "//prow/plugins/merge-method-comment:all-srcs",
        "//prow/plugins/mergecommitblocker:all-srcs",
        "//prow/plugins/milestone:all-srcs",
        "//prow/plugins/milestoneapplier:all-srcs",
        "//prow/plugins/milestonestatus:all-srcs",
        "//prow/plugins/override:all-srcs",
        "//prow/plugins/owners-label:all-srcs",
        "//prow/plugins/pony:all-srcs",
        "//prow/plugins/project:all-srcs",
        "//prow/plugins/projectmanager:all-srcs",
        "//prow/plugins/releasenote:all-srcs",
        "//prow/plugins/require-matching-label:all-srcs",
        "//prow/plugins/requiresig:all-srcs",
        "//prow/plugins/retitle:all-srcs",
        "//prow/plugins/shrug:all-srcs",
        "//prow/plugins/sigmention:all-srcs",
        "//prow/plugins/size:all-srcs",
        "//prow/plugins/skip:all-srcs",
        "//prow/plugins/slackevents:all-srcs",
        "//prow/plugins/stage:all-srcs",
        "//prow/plugins/trick-or-treat:all-srcs",
        "//prow/plugins/trigger:all-srcs",
        "//prow/plugins/updateconfig:all-srcs",
        "//prow/plugins/verify-owners:all-srcs",
        "//prow/plugins/welcome:all-srcs",
        "//prow/plugins/wip:all-srcs",
        "//prow/plugins/yuks:all-srcs",
    ],
    tags = ["automanaged"],
)
